import axios from 'axios'

let url = "http://localhost:3000"

//轮播图   type
export function getBanner(type=1){
    return axios.get(`${url}/banner?type=${type}`)
}

//推荐歌单   limit
export function getMusicList(limit=3){
    return axios.get(`${url}/personalized?limit=${limit}`)
}

//歌单详情   id -> list
export function getListView(id){
    return axios.get(`${url}/playlist/detail?id=${id}`)
}

//获取音乐   id -> url
export function getMusicUrl(id){
    return axios.get(`${url}/song/url?id=${id}`)
}